package com.yu.flow.demo;

public class TaskResult<T> {



    private TaskStatus status;
    private T output;
    private Exception error;
    private long executionTime;
    private int retryCount;

    public TaskResult(TaskStatus status, T output, Exception error, long executionTime, int retryCount) {
        this.status = status;
        this.output = output;
        this.error = error;
        this.executionTime = executionTime;
        this.retryCount = retryCount;
    }

    // getters and setters
    public TaskStatus getStatus() { return status; }
    public T getOutput() { return output; }
    public Exception getError() { return error; }
    public long getExecutionTime() { return executionTime; }
    public int getRetryCount() { return retryCount; }
}
